Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ESM + CJS support for live-compositor and @live-compositor/core #802

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

wkozyra95
Copy link
Member

@wkozyra95 wkozyra95 commented Oct 1, 2024

For node we usually want to support CJS modules, but for projects like vite ESM seems to be needed. This PR builds live-compositor and @live-compositor/core packages to both esm and cjs

@wkozyra95 wkozyra95 force-pushed the @wkozyra95/ts-sdk-add-esm-support branch 2 times, most recently from 1cf896b to bb1dc6c Compare October 1, 2024 13:59
@wkozyra95 wkozyra95 marked this pull request as ready for review October 1, 2024 14:04
@wkozyra95 wkozyra95 force-pushed the @wkozyra95/ts-sdk-add-esm-support branch from bb1dc6c to 3c9fb1b Compare October 1, 2024 14:11
@@ -23,14 +23,5 @@
},
"peerDependencies": {
"live-compositor": "^0.1.0"
},
"nx": {
"targets": {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I run npm run build often in root and this was very anoying

@@ -16,6 +17,17 @@
"tsconfig.json"
]
},
"settings": {
"import/parsers": {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By default eslint-plugin-import can't detect correctly exports section to detect esm, this seems to resolve the issue

Copy link
Member

@noituri noituri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🫡

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants